{% extends 'layouts/base-auth.html' %}
{% load static i18n %}

{% block content %}
<style>
  body {
    background: url("{% static 'assets/img/l2/bgs/bg.png' %}") no-repeat center center fixed;
    background-size: cover;
  }

  .reset-panel {
    background-color: rgba(15, 15, 15, 0.92);
    color: #f0e6d2;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    border: 1px solid #e0c36b;
  }

  .reset-panel h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #e0c36b;
    text-shadow: 0 0 10px rgba(255, 215, 100, 0.4);
  }

  .reset-panel label {
    color: #dcd4b0;
  }

  .form-control,
  .input-group-text {
    background-color: #1a1a1a;
    border-color: #444;
    color: #fff;
  }

  .form-control::placeholder {
    color: #aaa;
  }

  .text-danger {
    font-size: 0.85rem;
  }

  .btn-reset {
    background: linear-gradient(to right, #b89b56, #d5c170);
    color: #000;
    font-weight: bold;
    text-shadow: 0 0 5px #fff8dc;
    border: none;
  }

  .btn-reset:hover {
    background: linear-gradient(to right, #d5c170, #b89b56);
  }
</style>

<section class="vh-100 d-flex align-items-center justify-content-center">
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-md-6 col-lg-5">
        <div class="p-4 reset-panel">
          <h2 class="text-center mb-4">{% trans "Alterar senha" %}</h2>
          <form method="post">
            {% csrf_token %}

            <div class="mb-3">
              <label for="old_password">{{ form.old_password.label }}</label>
              <div class="input-group">
                <span class="input-group-text">
                  <svg class="icon icon-xs text-light" fill="currentColor" viewBox="0 0 20 20"
                    xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd"
                      d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
                      clip-rule="evenodd"></path>
                  </svg>
                </span>
                {{ form.old_password }}
              </div>
              <div class="text-danger">{{ form.old_password.errors }}</div>
            </div>

            <div class="mb-3">
              <label for="new_password1">{{ form.new_password1.label }}</label>
              <div class="input-group">
                <span class="input-group-text">
                  <svg class="icon icon-xs text-light" fill="currentColor" viewBox="0 0 20 20"
                    xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd"
                      d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
                      clip-rule="evenodd"></path>
                  </svg>
                </span>
                {{ form.new_password1 }}
              </div>
              <div class="text-danger">{{ form.new_password1.errors }}</div>
            </div>

            <div class="mb-4">
              <label for="new_password2">{{ form.new_password2.label }}</label>
              <div class="input-group">
                <span class="input-group-text">
                  <svg class="icon icon-xs text-light" fill="currentColor" viewBox="0 0 20 20"
                    xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd"
                      d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
                      clip-rule="evenodd"></path>
                  </svg>
                </span>
                {{ form.new_password2 }}
              </div>
              <div class="text-danger">{{ form.new_password2.errors }}</div>
            </div>

            <div class="d-grid">
              <button type="submit" class="btn btn-reset">{% trans "Salvar nova senha" %}</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>
{% endblock %}
